package org.esgl3d.spatial;

import org.esgl3d.rendering.RenderQueue;
import org.esgl3d.scene.CameraNode;
import org.esgl3d.scene.SceneNode;

/**
 * Basic interface for any kind of spartial tree.
 * @author michael
 *
 */
public interface SpatialStructure {
	/**
	 * Performs a full rebuild of the internal structure
	 */
	public void rebuild();
	
	
	/**
	 * Updates information of a single scene node.
	 * 
	 * @param node Node to update in the graph.
	 */
	public void update(SceneNode node);

	/**
	 * Iterates the structure and adds visible nodes into the
	 * rendering queue.
	 * 
	 * @param cam The currently active camera.
	 * @param queue The queue in which visible nodes are added.
	 */
	public void getVisibleNodes(CameraNode cam, RenderQueue queue);
}
